<%@ Page Language="C#" MasterPageFile="~/site.master" AutoEventWireup="true" CodeBehind="product.aspx.cs" Inherits="JTC.MiniCommerce.Web.product" Title="Untitled Page" %>
<%@ MasterType VirtualPath="~/site.master" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register TagPrefix="MiniCommerce" TagName="Navigation" Src="~/controls/navigation/storenavigation.ascx" %>
<%@ Register TagPrefix="MiniCommerce" TagName="Attributes" Src="~/controls/attributeSelector.ascx" %>
<%@ Register TagPrefix="MiniCommerce" TagName="CrossSells" Src="~/controls/catalogList.ascx" %>
<%@ Register TagPrefix="MiniCommerce" TagName="Review" Src="~/controls/navigation/review.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
  <div id="threeColumnLeftContent">
    <MiniCommerce:Navigation ID="navigation" runat="server" />
  </div>
  <div id="threeColumnRightContent">
    <asp:UpdatePanel ID="cart" runat="server">
      <ContentTemplate>
    <asp:Panel ID="pnlAddToCart" runat="server">
      <table style="height: 100px;width:100%;">
        <tr>
          <td style="height:80%;vertical-align:top;">
            <asp:UpdatePanel ID="upCart" runat="server">
              <ContentTemplate>
              </ContentTemplate>
            </asp:UpdatePanel>
          </td>
        </tr>
        <tr>
          <td>
            <asp:TextBox ID="txtQuantity" runat="server" CssClass="smalltextbox" Visible="false" /><asp:RequiredFieldValidator ID="rfvQuantity" runat="server" ControlToValidate="txtQuantity" Display="None" Visible="false" />
            <asp:FilteredTextBoxExtender ID="ftbeQuantity" runat="server" TargetControlId="txtQuantity" FilterType="Numbers" />
            <asp:DropDownList ID="ddlQuantity" runat="server" CssClass="dropdownlist" />
            <asp:Button ID="btnAddToCart" runat="server" CssClass="button" Text="Add To Cart" OnClick="btnAddToCart_Click"/>
            <asp:Panel ID="pnlValidation" runat="server">
              <asp:ValidationSummary ID="vsAttributes" runat="server" DisplayMode="BulletList" CssClass="validationSummary" />
            </asp:Panel>
          </td>
        </tr>
      </table>
    </asp:Panel>
    </ContentTemplate>
    </asp:UpdatePanel>
    <asp:Panel ID="pnlReview" runat="server" Visible="false">
      <br />
      <MiniCommerce:Review ID="review" runat="server" />
    </asp:Panel>
  </div>
  <div id="threeColumnMainContent">
    <div class="productSummary">
      <table class="defaultTable">
        <tr>
          <td colspan="2">
            <asp:Label ID="lblProductName" runat="server" CssClass="productName" />
          </td>
        </tr>
        <tr >
          <td class="imageCell">
            <asp:Image ID="defaultImage" runat="server" SkinId="noImage"/><br />
            <asp:Label ID="imageCaption" runat="server" CssClass="label" />
          </td>
          <td valign="top">
            <asp:Panel ID="pnlRetailPrice" runat="server" Visible="false">
              <asp:Label ID="lblRetialPrice" runat="server" CssClass="label" />&nbsp;<asp:Label ID="lblRetailPriceAmount" runat="server" CssClass="retailPrice" />
            </asp:Panel>
            <asp:Label ID="lblOurPrice" runat="server" CssClass="label" />&nbsp;<asp:Label ID="lblOurPriceAmount" runat="server" CssClass="ourPrice" /><br />
            <asp:Panel ID="pnlYouSave" runat="server" Visible="false">
            <asp:Label ID="lblYouSave" runat="server" CssClass="label" />&nbsp;<asp:Label ID="lblYouSaveAmount" runat="server" CssClass="label" />
            </asp:Panel>
            <asp:Rating ID="ajaxRating" runat="server" SkinID="rating" ReadOnly="true" />
            <asp:Label ID="lblShortDescription" runat="server" CssClass="label" /><br />
            <MiniCommerce:Attributes ID="productAttributes" runat="server" />
          </td>
        </tr>
        <tr>
          <td colspan="2">
            <asp:DataList ID="dlImages" runat="server" RepeatColumns="6" RepeatLayout="Table" RepeatDirection="Horizontal" CssClass="productImageList">
              <ItemTemplate>
                <asp:Image ID="img" runat="server" ImageUrl='<%# Eval("ImageUrl") %>' Height='<%# Eval("Height") %>' Width='<%# Eval("Width") %>' onmouseover='<%# Eval("Attributes[\"onmouseover\"]") %>' />
              </ItemTemplate>
            </asp:DataList>
          </td>        
        </tr>
        <tr>
          <td colspan="2">
            <asp:TabContainer ID="tcDescriptors" runat="server" Height="200px" ScrollBars="Vertical">
            </asp:TabContainer>
          </td>
        </tr>
        <tr>
          <td colspan="2">
            <br />
            <asp:Panel ID="pnlReviewsTitle" runat="server" CssClass="accordionHeaderGray">
              <div class="cpeTitle">
                <asp:Label ID="lblReviewsTitle" runat="server" />
              </div>
              <div class="cpeImage">
                <asp:Image ID="imgToggle" runat="server" />
              </div>
            </asp:Panel>
            <asp:Panel ID="pnlReviews" runat="server">
              <br />
              <asp:Repeater ID="rptrReviews" runat="server">
                <ItemTemplate>
                  <asp:Label ID="lblTitle" runat="server" CssClass="title" Text='<%# Eval("Title") %>' /><br />
                  <asp:Rating ID="reviewRating" runat="server" SkinID="rating" ReadOnly="true" CurrentRating='<%# Eval("Rating") %>' /><br /><br />
                  <asp:Label ID="lblBody" runat="server" CssClass="label" Text='<%# Eval("Body") %>' /><br /><hr /><br />
                </ItemTemplate>
              </asp:Repeater>
              <asp:Label ID="lblNoReviews" runat="server" CssClass="label" Visible="false" />
            </asp:Panel>
            <asp:CollapsiblePanelExtender ID="cpeReviews" runat="server" TargetControlID="pnlReviews" ExpandControlID="pnlReviewsTitle" CollapseControlID="pnlReviewsTitle" ImageControlID="imgToggle" ExpandDirection="Vertical" Collapsed="true" SkinId="withImage" />
          </td>
        </tr>
        <tr>
          <td colspan="2">
            <br />
            <asp:Label ID="lblCrossSells" runat="server" CssClass="label" />
            <MiniCommerce:CrossSells ID="crossSells" runat="server" />
          </td>
        </tr>
      </table>
    </div>
  </div>
</asp:Content>
